package com.hao.epidemic_prevention.bean;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * @ClassName User
 * @Descroption 小程序账号信息
 * @Author hao
 * @Date 2021/6/11 15:31
 **/

public class User {

    /**
     * User绑定的学生、教师账号，账号分别是studentId、teacherId，密码是password
     * studentId、teacherId根据这个User的role装在roleId
     */

    private Integer userId;
    //private String openId;
    private String roleId;
    private String role;
    //private String password;
    //private String idCard;
    private String name;
    // Student
    //private String studentName;
    //private String classId;
    //private String className;
    private String departmentId;
    private String departmentName;
    private Integer isFreeze;

    // Teacher
    //private String teacherName;

    public User(String name, String roleId, String role, String departmentId, String departmentName) {
        this.roleId = roleId;
        this.role = role;
        this.name = name;
        this.departmentId = departmentId;
        this.departmentName = departmentName;

    }

    public User(String name, String roleId, String role) {
        this.name = name;
        this.roleId = roleId;
        this.role = role;
    }
    public User() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }


    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }



    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public Integer getIsFreeze() {
        return isFreeze;
    }

    public void setIsFreeze(Integer isFreeze) {
        this.isFreeze = isFreeze;
    }

    @Autowired
    public String toString() {
        return "name: " + name + ',' +
                "roleId: " + roleId + ',' +
                "role: " + role + ',' +
                "departmentId: " + departmentId + ',' +
                "departmentName: " + departmentName ;
    }
}
